﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MandalaySoft.Common;

namespace SIMS.BL
{
    public class MarkingPeriod
    {
        public int MPID { get; set; }
        public int ParentMPID { get; set; }
        public int SchoolID { get; set; }
        public Int16 Type { get; set; }
        public string Title { get; set; }
        public string ShortName { get; set; }
        public DateTime StartDate { get; set; }
        public DateTime EndDate { get; set; }
        public bool IsGraded { get; set; }
        public bool IsExam { get; set; }
        public bool IsComment { get; set; }
        public DateTime GradePostStartDate { get; set; }
        public DateTime GradePostEndDate { get; set; }
        public bool IsActive { get; set; }

        public int CreatedBy { get; set; }
        public string CreatedByName { get; set; }
        public DateTime CreatedDate { get; set; }

        public int ModifiedBy { get; set; }
        public string ModifiedByName { get; set; }
        public DateTime ModifiedDate { get; set; }

        public MyError Error { get; set; }

        public MarkingPeriod()
        {
            ClearFields();
        }

        private void ClearFields()
        {
            MPID = -1;
            ParentMPID = -1;
            SchoolID = -1;
            Title = string.Empty;
            ShortName = string.Empty;
            StartDate = new DateTime(1900, 1, 1);
            EndDate = new DateTime(1900, 1, 1);
            IsGraded = false;
            IsExam = false;
            IsComment = false;
            GradePostStartDate = new DateTime(1900, 1, 1);
            GradePostEndDate = new DateTime(1900, 1, 1);
            IsActive = false;
            CreatedBy = -1;
            CreatedByName = string.Empty;
            CreatedDate = new DateTime(1900, 1, 1);
            ModifiedBy = -1;
            ModifiedByName = string.Empty;
            ModifiedDate = new DateTime(1900, 1, 1);
            Error = new MyError();
        }
    }
}
